home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
Test.dir
/
00007_Script_answer code
< prev
next >
Wrap
Text File
|
2002-10-15
|
2KB
|
88 lines
property spritenum,mysprite,mymem,myid,state,rolled
global testobj
on new me
state=0
mysprite=sprite(spritenum)
mymem=mysprite.member
rolled=0
end
on getpropertydescriptionlist me
plist=[#myid:[#comment:"My answer ID",#format:#integer,#default:1,#range:[#min:1,#max:10]]]
return plist
end
on mouseenter me
if state=0 then
state=1
sendallsprites(#menter,myid)
if mymem.type=#bitmap then
mysprite.member=member(mymem.name&"hot")
rolled=1
end if
if mymem.type=#field then
mymem.forecolor=29
rolled=1
end if
end if
end
on mouseleave me
if state=1 then
state=0
sendallsprites(#mleave,myid)
if mymem.type=#bitmap then
mysprite.member=mymem
rolled=0
end if
if mymem.type=#field then
mymem.forecolor=255
rolled=0
end if
end if
end
on menter me,n
if n=myid and state=0 then mouseenter(me)
end
on mleave me,n
if n=myid and state=1 then mouseleave(me)
end
on mousedown me
if state=1 then
testobj.answer_clicked(myid)
end if
end
on pause_answers me
state=2
end
on resume_answers(me)
state=0
if rollover(spritenum) then
mouseenter(me)
else
if rolled=1 then
state=1
mouseleave(me)
end if
end if
end
on answer_text me,n,txt
if mymem.type=#field and n=myid then
mymem.text=txt
end if
end
on get_loc me,n
if n=myid and mymem.type=#bitmap then
return(mysprite.loc)
end if
end